package com.hh.front.controller;


import com.hh.common.response.AuthLoginResponse;
import com.hh.common.response.CommonResult;
import com.hh.front.request.AuthLoginRequest;
import com.hh.front.service.WxUserInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 微信授权登录
 */
@Slf4j
@RestController()
@RequestMapping("api/front/wx")
public class WxLoginController {


    @Autowired
    private WxUserInfoService wxUserInfoService;

    /**
     * 授权登录
     * @param request
     * @return
     */
    @RequestMapping(value = "/authLogin",method = RequestMethod.POST)
    public CommonResult<AuthLoginResponse> authLogin(@RequestBody AuthLoginRequest request) {
        return wxUserInfoService.authLogin(request);
    }


}
